﻿using INTEX.DataBase;
using INTEX.DataBase.Tools;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
namespace WPFExcelReport
{
    //
    public class JLTAB45DOCData : BaseFunction
    {
        ApplicationBase app

        {
            get
            {
                return ApplicationBase.Instance;
            }
        }
        public INTEXDBC INTEXDBC
        {
            get
            {
                return app.INTEXDBC;
            }
        }
        public INTEXBL INTEXBL
        {
            get
            {
                return app.INTEXBL;
            }
        }
        SETINTEXDB INTEXDB = new SETINTEXDB();
        public JLTAB45DOCData()
            : base()
        {
            Helpers.Helper.GetDate(ref date, ref year, ref month, ref day);
        }
  
        public DataSet BuildData(DataRow dwInput)
        {
            DataSet SResult = new DataSet();
            DataSet SReturn = new DataSet();
            DataRow dwData = null;
            DataRow dwABP = null;
            try
            {
                string MANDANT = dwInput["ABPMANDANT"].ToString();
                string KRS = dwInput["ABPAUFKRS"].ToString();
                string LFD = dwInput["ABPAUFLFD"].ToString();
                SResult = INTEXBL.QueryABK(MANDANT,KRS,LFD);
                SReturn.Merge(SResult);  
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
            return SReturn;
        }

    }
}